Skip to main content

8. Logging

For every DVLA API request,dvlaLogger is used to create a document inside a firebase collection of respective method name as mentioned below

Logs |--> DVLA | |--> callLicenceCheckAPI

  • The dvlaLogger returns a function called as updateLog.
  • The updateLog function is used to log various events during the API call.
  • It logs at different stages of the API call for monitoring and debugging purposes.
  • Logging includes:
    • level: Specifies the log level, such as 'info' or 'error'.
    • request: Logs the details of the API request for DVLA ADD API.
    • requestForJWT: Logs the details of the API request for DVLA AUTH API.
    • message: Describes the purpose of the log, e.g., "calling DVLA API with payload".
    • path: Logs the path of the response received.
    • response: Logs the encrypted API response data for DVLA ADD API.
    • responseForJWT: Logs the API response data for DVLA AUTH API.
    • error: Logs any error that occurs during the API call.
    • driverDetails: Contains information about the driver, including their lease and driver ID, lease name, and driver name.
Status: Draft (Pending Review)
Category: Protected
Authored By: Dhaval on May 13, 2022
Revisions
10 Oct, 2023 Updated logging info for DVLA ADD API and DVLA AUTH API, by Sohan.
06 Dec, 2023 Updated info about logging encrypted DVLA response, by Sohan.